package com.mk.admin.controller;

import com.mk.admin.model.ResultDto;
import com.mk.admin.model.query.*;
import com.mk.admin.service.MedicalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/a/adm/medical")
@Api(tags = "药品")
public class MedicalController {
    @Autowired
    private MedicalService medicalService;

//    @PostMapping("/list")
//    @ApiOperation(value = "com_0022获取药品信息")
//    public ResultDto list(@RequestBody MedicalListQuery query) {
//        return medicalService.list(query);
//    }

    @PostMapping("/inventory")
    @ApiOperation(value = "com_0023获取药品库存")
    public ResultDto inventory(@RequestBody MedicalInventoryQuery query) {
        return medicalService.inventory(query);
    }

    @PostMapping("/useWay")
    @ApiOperation(value = "com_0025获取医院药品的给药途径")
    public ResultDto useWay(@RequestBody MedicalUseWayQuery query) {
        return medicalService.useWay(query);
    }

    @PostMapping("/decoctWay")
    @ApiOperation(value = "com_0026获取医院中药处方煎药方式")
    public ResultDto decoctWay(@RequestBody MedicalDecoctWayQuery query) {
        return medicalService.decoctWay(query);
    }

    @PostMapping("/decoctDesc")
    @ApiOperation(value = "com_0027获取医院中药处方煎药说明")
    public ResultDto decoctDesc(@RequestBody MedicalDecoctDescQuery query) {
        return medicalService.decoctDesc(query);
    }

    @PostMapping("/takeWay")
    @ApiOperation(value = "com_0028获取医院中药处方服用方法")
    public ResultDto takeWay(@RequestBody MedicalTakeWayQuery query) {
        return medicalService.takeWay(query);
    }
}
